package com.xbongbong.saas.domain.dao;

import com.xbongbong.pro.domain.entity.UpdateDataEntity;
import com.xbongbong.saas.domain.entity.ext.CreditLimitEntityExt;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface CreditLimitDao {

    Integer insert(CreditLimitEntityExt entity);

    void insertBatch(List<CreditLimitEntityExt> list);

    CreditLimitEntityExt getByKey(@Param("key") Long key, @Param("corpid") String corpid );

    CreditLimitEntityExt getByCustomerId(@Param("customerId") String key, @Param("corpid") String corpid );

    Integer update(CreditLimitEntityExt entity);

    /**
     * 更新下更新时间
     */
    Integer updateTime(@Param("updateTime") Long updateTime, @Param("id") Long id, @Param("corpid") String corpid);

    Integer updateBatch(@Param("list") List<UpdateDataEntity> list, @Param("corpid") String corpid);

    List<CreditLimitEntityExt> findEntities(@Param("param") Map<String, Object> param);

    Integer getEntitiesCount(@Param("param") Map<String, Object> param);
}